import {request} from './request'
import qs from "qs";

//获取最新的数据
export function getLatestFormInfo(){
  return request({
    url:'/user/getLatestFormInfo'
  })
}

//获取今日是否已经填写表单，如果已经填写，将返回填写的天数，fillingDays
export function getFillStatus(){
  return request({
    url: '/user/getFillStatus'
  })
}

//提交表单
export function chockIn(data){
  return request({
    url:'/user/chockIn',
    data,
    method:'post'
  })
}
export class User{
  constructor(data){
    //账号id
    this.accountId = data.accountId;
    //名字
    this.name=data.name;
    //证件类型
    this.certificateType=data.certificateType;
    //证件号码
    this.idNumber=data.idNumber;
    //身份类别
    this.identityCategory=data.identityCategory;
    //所在校区
    this.schoolLocation=data.schoolLocation;
    //籍贯
    this.nativePlace=data.nativePlace;
    //户籍
    this.householdRegister = data.householdRegister;
    //家庭住址
    this.address=data.address;
    //电话号码
    this.phoneNumber=data.phoneNumber;
    //紧急联系人
    this.contacts=data.contacts;
    //联系人号码
    this.contactNumber=data.contactNumber;
    //性别
    this.gender=data.gender;
    //学院
    this.department=data.department;
    //班级
    this.classname=data.classname;
  }
}

export class Form{
  constructor(data){
    this.accountId=data.accountId;              //账号id,外键
    this.physicalCondition=data.physicalCondition;       //身体状况
    this.toEpidemicArea=data.toEpidemicArea;          //是否到达或途径疫情防控重点地区
    this.areaLocation=data.areaLocation;            //曾途径疫区地点
    this.areaLeaveTime=data.areaLeaveTime;             //最后离开途径疫区的时间
    this.contactPerson=data.contactPerson;           //是否接触过疫区人员
    this.personLastTime=data.personLastTime;            //接触的最后时间
    this.contactSuspectedCase=data.contactSuspectedCase;    //是否有接触过疑似病例
    this.caseLastTime=data.caseLastTime;              //接触病例的最后时间
    this.isMedicalObservation=data.isMedicalObservation;    //是否在莞隔离医学观察
    this.terminationObservationTime=data.terminationObservationTime;//预计终止医学隔离观察时间
    this.inGuan=data.inGuan;                  //目前是否在莞
    this.guanTownStreet=data.guanTownStreet;          //在莞时，目前所在镇街
    this.provinceCity=data.provinceCity;            //不在莞，目前所在地址（省/市/区）
    this.backGuanTime=data.backGuanTime;              //计划返莞日期
    this.backGuanTransportation=data.backGuanTransportation;  //返莞交通工具
    this.backRouteTime=data.backRouteTime;             //返莞交通工具具体行程、时间
    this.isLeaveGuan=data.isLeaveGuan;             //否有离莞出行的行动
    this.leaveTimePlace=data.leaveTimePlace;          //离莞具体出行时间和地点
    this.isMidpoint=data.isMidpoint;              //是否为重点人群
    this.familyCondition=data.familyCondition;         //同住的家庭成员情况
    this.wentCity=data.wentCity;                //曾去过以下城市
    this.remark=data.remark;                  //备注
    this.temperature=data.temperature;             //今日体温
  }
}

